import request from "./request"
// 请求角色列表
function getroles(){
    return request.get("roles")
}
// 请求角色树状图
function getrights(){
    return request.get("rights/tree")
}
//添加角色接口
function getrolesadd(params){
    return request.post("roles",params)
}
//编辑角色接口
function getrolesedit(params){
    return request.put(`roles/${params.id}`,params)
}
//删除角色接口
function getrolesdelete(id){
    return request.delete(`roles/${id}`)
}
//确认权限更改
function getaddeditroles(rolesId,params){
    return request.post(`roles/${rolesId}/rights`,params)
}

export {getroles,getrights,getrolesadd,getrolesedit,getrolesdelete,getaddeditroles}